﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SNAGITLib;
using Crsspy.WebBrowser;
namespace Deloitte
{
    public class SnagITImageCapture
    {
        private SNAGITLib.IImageCapture _imageCapture;        
        
        public SNAGITLib.IImageCapture ImageCapture
        {
            get { return _imageCapture; }
            set { _imageCapture = value; }
        }

        public SnagITImageCapture()
        {
            ImageCapture = new SNAGITLib.ImageCaptureClass();            
        }

        public void CaptureHtmlAsJpeg(string htmlFilePath)
        {
            this.ImageCapture.AutoScrollOptions.AutoScrollMethod = snagAutoScrollMethod.sasmBoth;
            this.ImageCapture.Input = snagImageInput.siiWindow;
            //this.ImageCapture.InputTWAINOptions.Source = htmlFilePath;
            this.ImageCapture.Output = snagImageOutput.sioFile;
            this.ImageCapture.OutputImageFile.FileType = snagImageFileType.siftJPEG;
            ImageCapture.OutputImageFile.Filename = htmlFilePath + ".jpg";

            this.ImageCapture.Capture();                  
        }
    }
}
